import java.util.Scanner;
public class 四位数加密 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        System.out.println("输入4位数加密");
        int num = in.nextInt();
        int ge = num%100%10;
        int shi = num/10%10;
        int bai = num/100%10;
        int qian = num/1000;
        int new_ge=(ge+9)%10;
        int new_shi=(shi+9)%10;
        int new_bai=(bai+9)%10;
        int new_qian=(qian+9)%10;
        System.out.println("新的四位数是:"+new_shi+new_ge+new_qian+new_bai);
    }
}
